package com.ronsai.umtrack;

import android.app.Application;
import android.content.Context;
import android.util.Log;

import com.meituan.android.walle.WalleChannelReader;
import com.umeng.commonsdk.UMConfigure;

public class MyApp extends Application {

    private static Context mContext;

    public static String mToken;

    public static void setToken(String token) {
        mToken = token;
    }

    public static String getToken() {
        return mToken;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;
        // 友盟初始化
        UMConfigure.init(this, "5bfdf717f1f5563a6e000be3", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, null);
        String channel = WalleChannelReader.getChannel(this.getApplicationContext());
        Log.d("log_test", "channel = " + channel);
    }

    public static Context getContext() {
        return mContext;
    }
}
